<template>
	<view class="container">
		<view class="bg">

		</view>
		<view class="content">
			<view class="title">
				结算费率信息
			</view>
			<view class="rate">
				<view>
					<view>银行卡</view>
					<view class="bold">{{rateInfo.posdebitRate}}%</view>
				</view>
				<view>
					<view>信用卡</view>
					<view class="bold">{{rateInfo.poscreditRate}}%</view>
				</view>
				<view>
					<view>云闪付</view>
					<view class="bold">{{rateInfo.ylCodeMoreRate}}%</view>
				</view>
				<view>
					<view>扫码</view>
					<view class="bold">{{rateInfo.mobilePayRate}}%</view>
				</view>
			</view>

			<view class="card">
				<view class="head">
					<view class="left">已认证卡使用限额</view>
					<view class="right">已认证卡</view>
				</view>
				<view class="ic-content">
					<view>
						<text>IC卡使用限额</text><text class="tip">IC卡</text>
					</view>
					<view class="ic">
						<view class="item">
							<view class="money">{{rateInfo.icDayLimit}}<text class="unit">元</text></view>
							<view class="desc">单日</view>
						</view>
						<view class="item">
							<view class="money">{{rateInfo.icOneLimit}}<text class="unit">元</text></view>
							<view class="desc">单笔</view>
						</view>
					</view>
				</view>
				<view class="ic-content border-none">
					<view>
						<text>磁条卡使用限额</text><text class="tip">磁条卡</text>
					</view>
					<view class="ic">
						<view class="item">
							<view class="money">{{rateInfo.mcDayLimit}}<text class="unit">元</text></view>
							<view class="desc">单日</view>
						</view>
						<view class="item">
							<view class="money">{{rateInfo.mcOneLimit}}<text class="unit">元</text></view>
							<view class="desc">单笔</view>
						</view>
					</view>
				</view>
			</view>

			<view class="card">
				<view class="head">
					<view class="left">未认证卡使用限额</view>
					<view class="right unauth">未认证卡</view>
				</view>
				<view class="ic-content">
					<view>
						<text>IC卡使用限额</text><text class="tip">IC卡</text>
					</view>
					<view class="ic">
						<view class="item">
							<view class="money">{{rateInfo.dayLimit}}<text class="unit">元</text></view>
							<view class="desc">单日</view>
						</view>
						<view class="item">
							<view class="money">{{rateInfo.oenLimit}}<text class="unit">元</text></view>
							<view class="desc">单笔</view>
						</view>
					</view>
				</view>
				<view class="ic-content border-none">
					<view>
						<text>磁条卡使用限额</text><text class="tip">磁条卡</text>
					</view>
					<view class="ic">
						<view class="item">
							<view class="money">{{rateInfo.dayLimit}}<text class="unit">元</text></view>
							<view class="desc">单日</view>
						</view>
						<view class="item">
							<view class="money">{{rateInfo.oenLimit}}<text class="unit">元</text></view>
							<view class="desc">单笔</view>
						</view>
					</view>
				</view>
			</view>
		</view>


	</view>
</template>

<script setup>
	import {
		ref,
		reactive
	} from "vue";
	import {
		useStore
	} from "@/store/index";
	import {
		showModal,
		showToast
	} from "@/utils/toast";
	import {
		onLoad
	} from "@dcloudio/uni-app";
	import {
		queryMerchants
	} from "@/api/mine";
	import {
		queryRateInfo
	} from "@/api/common.js"
	onLoad(async (val) => {
		console.log("val-val", val)
		merchantStatus(val.merchantId)
	});
	// 费率信息
	const rateInfo = ref({})
	// 查询设备状态
	const merchantStatus = (val) => {
		queryRateInfo(val)
			.then((res) => {
				console.log("res-red", res)
				rateInfo.value = res;
			})
			.catch((err) => {

			});
	}
</script>

<style lang="scss" scoped>
	@import './index.scss';
</style>